package com.game.thrones.service;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.game.thrones.controller.input.PageInput;
import com.game.thrones.domain.KbmContent;
import com.game.thrones.domain.IdEntity.IdEntityAuto;

public interface BaseService<T, ID extends Serializable> {
	public void add(IdEntityAuto t);

	public void update(IdEntityAuto t);

	public void del(IdEntityAuto entity);

	public T findOne(KbmContent kbmContent, Map<String, Object> param);

	public T findOne(KbmContent kbmContent, Object input);

	public T findOneBySql(KbmContent kbmContent, String sql);

	public List<Object> findListBySql(KbmContent kbmContent, String sql);

	public T findOneById(KbmContent kbmContent, Integer id);

	public List<T> findByPage(PageInput input);

	public Integer count(KbmContent kbmContent, Map<String, Object> param);

	public Integer count(KbmContent kbmContent, String sql);

	public Integer countByPage(PageInput input);

	public List<T> find(KbmContent kbmContent, Map<String, Object> param);

	public List<T> find(KbmContent kbmContent, Object input);

	public List<T> findBySql(KbmContent kbmContent, String sql);

	public List<T> findAll(KbmContent kbmContent);

	public Integer countAll(KbmContent kbmContent);

}
